// DIPLEDSerialACW
// Joe Pardue April 11, 2009


#include "libACW001.h"

int value = 0;

int main(void)
{
	init();		// Initialize the private stuff
	setup();	// Setup the public stuff

	for(;;)		// Call loop() forever
		loop();

	return 0;	// You never get here
}


void setup()
{
  // Init port pins
  DDRB = 0x00;    // set port B pins
  PORTB = 0xFF;   // set port pullups
  
  DDRD = 0xFF;    // set port D for output
  
  serialBegin(9600);
  
}

void loop()
{
  // load PORTB pins into value
  value = PINB;
  
  // shift value left 3 positions
  PORTD = (value << 3);
  //Serial.print("value = ");
  //Serial.println(value);
  printf("value = %d\n", value);
  delay(1000);
 
}
